package com.dubbo.controller;

import com.dubbo.api.EchoService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: TongRui乀
 * @Date: 2019-11-27 17:47
 * @description：
 */
@RestController
@RequestMapping("dubbo")
public class WebController {

    @Reference
    private EchoService echoService;

    @GetMapping("echo/{value}")
    public String hello(@PathVariable String value){
        return this.echoService.echo(value);
    }

}
